<template>
  <div>
      <h1>组件2......</h1>
      <img :src="result.message" alt="" style="width:300px;">
  </div>
</template>

<script>
import axios from 'axios'
import {defineComponent} from 'vue'
export default defineComponent({
   async setup() {
       let url = 'https://dog.ceo/api/breed/pug/images/random'
        let data = await axios.get(url)
        console.log("qqq=",data)
        return {
            result: data.data
        }
    }
})
</script>

<style>

</style>